package com.mrjy.video.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mrjy.common.entity.VideoTipPayment;
import com.mrjy.common.entity.UserInfo;
import com.mrjy.common.util.GlobalConstant;
import com.mrjy.video.bo.IVideoTipPaymentBo;

@Controller
@RequestMapping("/course/courseVideoTip")
public class VideoTipPaymentController {
	@Resource
	private IVideoTipPaymentBo courseVideoTipPaymentBo;
	
	
	/**
	 * 提交订单
	 * @return
	 */
	@RequestMapping("/submitPayment")
	@ResponseBody
	public Object submitPayment(VideoTipPayment courseVideoTipPayment, HttpSession session){
		UserInfo userInfo = ((UserInfo) session.getAttribute(GlobalConstant.USER_INFO));
		courseVideoTipPayment.setVideoId(courseVideoTipPayment.getId());
		return courseVideoTipPaymentBo.txSubmitPayment(courseVideoTipPayment, userInfo);
	}
	
	
}
